home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / DVSHADOW.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  2KB  |  66 lines

  1. /*=======================================================*/
  2. /*  DVSHADOW.C                                           */
  3. /*     functions dealing with shadow buffer              */
  4. /*                                                       */
  5. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  6. /*  May be freely copied for noncommercial use, so long  */
  7. /*  as this copyright notice remains intact, and any     */
  8. /*  changes are marked in the comment blocks preceding   */
  9. /*  functions.                                           */
  10. /*=======================================================*/
  11.  
  12. #include "tvapi.h"
  13.  
  14. /*======================================================*/
  15. /* DVshadow_start  start shadowing video buffer, return */
  16. /*                 info about shadow buffer             */
  17. /*   Ralf Brown 6/23/88                                 */
  18. /*======================================================*/
  19.  
  20. void far *DVshadow_start(int *rows,int *cols)
  21. {
  22. #ifdef __TURBOC__
  23.    _AX = 0x2B02 ;
  24.    _CX = 0x4445 ;
  25.    _DX = 0x5351 ;
  26.    geninterrupt(0x21) ;
  27.    *rows = _BH ;
  28.    *cols = _BL ;
  29.    return MK_FP(_DX,0) ;
  30. #else
  31.    union REGS regs ;
  32.  
  33.    regs.x.ax = 0x2B02 ;
  34.    regs.x.cx = 0x4445 ;
  35.    regs.x.dx = 0x5351 ;
  36.    int86(0x21,®,®s) ;
  37.    *rows = regs.h.bh ;
  38.    *cols = regs.h.bl ;
  39.    return MK_FP(regs.x.dx,0) ;
  40. #endif __TURBOC__
  41. }
  42.  
  43. /*======================================================*/
  44. /* DVshadow_stop  stop shadowing vidoe buffer           */
  45. /*   Ralf Brown 6/23/88                                 */
  46. /*======================================================*/
  47.  
  48. void DVshadow_stop(void)
  49. {
  50. #ifdef __TURBOC__
  51.    _AX = 0x2B05 ;
  52.    _CX = 0x4445 ;
  53.    _DX = 0x5351 ;
  54.    geninterrupt(0x21) ;
  55. #else
  56.    union REGS regs ;
  57.  
  58.    regs.x.ax = 0x2B05 ;
  59.    regs.x.cx = 0x4445 ;
  60.    regs.x.dx = 0x5351 ;
  61.    int86(0x21,®s,®s) ;
  62. #endif __TURBOC__
  63. }
  64.  
  65. /* End of DVSHADOW.C */
  66.